/*
 * @Author: xiaosihan 
 * @Date: 2024-10-30 08:27:01 
 * @Last Modified by: xiaosihan
 * @Last Modified time: 2024-10-31 02:04:16
 */

import { autorun } from "mobx";
import { ReactNode, useEffect, useRef, useState } from "react";
import styles from "./centerTop.module.less";
import SmallAmountRepeatConsumption from "./SmallAmountRepeatConsumption/SmallAmountRepeatConsumption";
import InstitutionalRepeatConsumption from "./InstitutionalRepeatConsumption/InstitutionalRepeatConsumption";

import rightPNG from "../img/right.png";
import leftGIF from "../img/left.gif";
import centerTopStore from "./centerTopStore";

interface Iprops {
    children?: ReactNode
}

export default function CenterTop(props: Iprops) {

    const dom = useRef<HTMLDivElement | null>(null);
    const [data, setData] = useState({});

    useEffect(() => {

    }, []);

    useEffect(() => autorun(() => {

    }, { delay: 10 }), []);

    return (
        <div ref={dom} className={styles.centerTop} >

            {/* <img
                className={styles.left}
                src={leftGIF}
                alt=""
                onClick={() => centerTopStore.prev()}
            /> */}
            <img
                className={styles.right}
                src={leftGIF}
                alt=""
                onClick={() => centerTopStore.next()}
            />

            {/* 同单位同金额连续划卡 */}
            <InstitutionalRepeatConsumption />

            {/* 门诊小额个账连续划卡 */}
            <SmallAmountRepeatConsumption />

        </div>
    );

}